// NetTVDlg.h : header file
//
//{{AFX_INCLUDES()
#include "wmpplayer4.h"
//}}AFX_INCLUDES

#include "CWmStreaming.h"
#include "SendLog.h"
#include "GetLatestVersion.h"
#include "GetMaxSize.h"
#include "GetMenuList.h"
#include "EasySize.h"
#include "PeerCtrl.h"

enum WATCH_STATUS{
	INIT,
	BUFFERING,
	WATCH,
	STOP,
	OTHER,
	P2P
};
#if !defined(AFX_NETTVDLG_H__5EF77E84_3395_41CE_8C19_27D719AD1C7D__INCLUDED_)
#define AFX_NETTVDLG_H__5EF77E84_3395_41CE_8C19_27D719AD1C7D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CNetTVDlg dialog

class CNetTVDlg : public CDialog
{
	DECLARE_EASYSIZE
// Construction
public:
	int m_bottomHeight;
	CRect m_hndRect;
	void initSizeMap();
	int onSizeNum;
	CNetTVDlg(CWnd* pParent = NULL);	// standard constructor
	
	BOOL Connect2FatherAndBrocast(CString url);
	void UpdateControls(BOOL inIsStreaming);
	BOOL SetLocalChannelMenu();
	BOOL m_bIsMore;
	BOOL m_bIsTop;
	
	WATCH_STATUS m_status;
	string m_sChannelName;
	string m_sChannelSrc;
	int m_iVersion;
	CGetMenuList selfTvList;
	CGetLatestVersion version;
	CGetMaxSize maxsize;
	CPeerCtrl* ctrl;

// Dialog Data
	//{{AFX_DATA(CNetTVDlg)
	enum { IDD = IDD_NETTV_DIALOG };
	CButton	m_btnFlesh;
	CListCtrl	m_listCtrl2;
	CListBox	m_listBoxCtrl4;
	CListCtrl	m_listCtrl1;
	CListCtrl	m_listZsu;
	CTabCtrl	m_tabCtrl;
	CButton	m_BtnStart;
	CButton	m_BtnEnd;
	CWMPPlayer4	m_wmplayer;
	CString	m_labelStatus;
	CString	m_wmpStatus;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNetTVDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual BOOL DestroyWindow();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	CWmStreaming	mStreamer;
	
	BOOL inIsStreaming;
	// Generated message map functions
	//{{AFX_MSG(CNetTVDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtnStart();
	afx_msg void OnBtnEnd();
	afx_msg void OnBtnmore();
	afx_msg void OnBtntop();
	afx_msg void OnSelchangeTabctrl(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDblclkList1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKeydownList1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnOK();
	afx_msg void OnClose();
	afx_msg void OnDestroy();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnOpenStateChangeWmplayer(long NewState);
	afx_msg void OnPlayStateChangeWmplayer(long NewState);
	afx_msg void OnDblclkList2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnBtnFlesh();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnTimer(UINT nIDEvent);
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NETTVDLG_H__5EF77E84_3395_41CE_8C19_27D719AD1C7D__INCLUDED_)
